package com.chengcang.api.modules.busi.dto;

import com.chengcang.common.validator.group.AddGroup;
import com.chengcang.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;


/**
 * 发票抬头
 *
 * @author Zhanli xy321231@163.com
 * @since 1.0.0 2023-01-14
 */
@Data
@ApiModel(value = "发票抬头")
public class BusiInvoiceHeadDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @NotNull(message = "id不能为空",groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty(value = "企业名称")
    private String invoiceHead;

    @ApiModelProperty(value = "企业税号")
    @Pattern(regexp = "^[a-zA-Z0-9]{1,20}$",message = "税号只能为20位数字和英文")
    private String invoiceCode;

    @ApiModelProperty(value = "发票类型")
    private Integer invoiceType;

    @ApiModelProperty(value = "发票类型名称")
    private String invoiceTypeName;

    @ApiModelProperty(value = "企业地址")
    private String invoiceAddress;

    @ApiModelProperty(value = "手机号码")
    //@Pattern(regexp = "^[0-9-]{13}$",message = "手机号格式不正确")
    private String invoiceMobile;

    @ApiModelProperty(value = "银行名称")
    //@Length(max = 20,message = "开票行长度不能超过20字")
    private String invoiceBankName;

    @ApiModelProperty(value = "银行账号")
    //@Pattern(regexp = "^[0-9]{1,32}$")
    private String invoiceBankAccount;

    @ApiModelProperty(value = "电子发票邮箱")
    //@Pattern(regexp = "^[0-9]{1,32}$")
    private String invoiceEmail;

    @ApiModelProperty(value = "客户id")
    private Long tenantId;

    @ApiModelProperty(value = "创建人员")
    private Long creator;

    @ApiModelProperty(value = "更新人员")
    private Long updater;

    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    @ApiModelProperty(value = "更新时间")
    private Date updateDate;

    @ApiModelProperty(value = "0 有效 1 无效")
    private Integer deleted;

    @ApiModelProperty(value = "是否默认 0 是 1否")
    @NotNull(message = "是否默认必须填写",groups = AddGroup.class)
    private Integer defaulted;


}